<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<?php
	require_once 'class.heater_calculator.php';
	require_once 'my_global.php';

	$form_params = array();
	$form_params['power'] = $_GET['power'];
	$form_params['voltage'] = $_GET['voltage'];
	$form_params['pgrid'] = $_GET['pgrid'];
	$form_params['material'] = $_GET['material'];
	$form_params['max_temp'] = $_GET['max_temp'];
	$form_params['resistivity'] = $_GET['resistivity'];
	$form_params['temp_heating'] = $_GET['temp_heating'];
	$form_params['placement'] = $_GET['placement'];

	echo '<br><br> _GET: '; print_r($_GET); echo '<br><br>';
	echo '<br><br> form_params: '; print_r($form_params); echo '<br><br>';
	
	$hcalc = new HeaterCalculator($form_params, "calc_heater");
	$result = array();
	$hcalc->calc();
	$res = $hcalc->getJSONResult();
	echo '<br><br>json-ответ: '.$res.'<br><br>';
	//echo '<br><br>result: '; print_r($result); echo '<br><br>';
	// отправка результатов клиенту
?>
</body>
</html>